﻿using Google.OrTools.ConstraintSolver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Study.GoogleOptimizationTools.ConsoleApp.Extensions
{
    public static class ZipExtentions
    {

        static public IEnumerable<ZipValues<TFirst, TSecond>> Zip<TFirst, TSecond>(this IEnumerable<TFirst> firsts, IEnumerable<TSecond> seconds)
        {
            return firsts.Zip(seconds, (f, s) =>new ZipValues<TFirst, TSecond>(f,s));
        }


        
    }


    public struct ZipValues<TFirst, TSecond>
    {
        public ZipValues(TFirst first, TSecond second) : this()
        {
            this.First = first;
            this.Second = second;
        }

        public TFirst First { get;private set; }
        public TSecond Second { get;private set; }
    }
}
